<?php

/**
 * Subclass for representing a row from the 'contratacion.contrato' table.
 *
 * 
 *
 * @package plugins/contratacion/lib/model
 */ 
class ContratacionContrato extends BaseContratacionContrato
{
	/**
	 * Initializes internal state of ContratacionContrato object.
	 * @see        parent::__construct()
	 */
	public function __construct()
	{
		// Make sure that parent constructor is always invoked, since that
		// is where any default values for this object are set.
		parent::__construct();
	}
	
	public function __toString()
	{
		return self::getNumeroContrato($this->id)." -- ".$this->getKernelTercero();
	}
	
	public function infoAutocompletar()
	{
	    $info = array();
        $info[] = $this->getId();
        $info[] = $this->__toString();
        return $info;	
		
	}
	
	static public function getNumeroContrato($num)
	{
		return str_pad($num, 12, "0", STR_PAD_LEFT);  
		
	}
	
	public function getIdContrato()
	{
		return self::getNumeroContrato($this->getId());  
	}
	
	public function propiedadFueModificada($prop)
	{
	//
        if(isset($this->modifiedColumns[$prop]))
        {
            return true;
        }
        return false;
    }

}
